class Book < ActiveRecord::Base
  validates_presence_of :title
  validates_uniqueness_of :permalink
  
  belongs_to :author
    
  def to_param
    permalink
  end
end